package com.jd.sunny.java.annotation;


/**
 * Created by IntelliJ IDEA.
 * User: sunlin
 * Date: 12-8-10
 * Time: 涓嬪�?:16
 * To change this template use File | Settings | File Templates.
 */

import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;

/*
 * 鍏冩敞瑙Target,@Retention,@Documented,@Inherited
 *
 *     @Target 琛ㄧず璇ユ敞瑙ｇ敤浜庝粈涔堝湴鏂癸紝鍙兘鐨�ElemenetType 鍙傛暟鍖呮嫭锛�
 *         ElemenetType.CONSTRUCTOR 鏋勯�鍣ㄥ０鏄�
 *         ElemenetType.FIELD 鍩熷０鏄庯紙鍖呮�?enum 瀹炰緥锛�?
 *         ElemenetType.LOCAL_VARIABLE 灞�儴鍙�?��澹版�?
 *         ElemenetType.METHOD 鏂规硶澹版槑
 *         ElemenetType.PACKAGE 鍖呭０鏄�?
 *         ElemenetType.PARAMETER 鍙傛暟澹版槑
 *         ElemenetType.TYPE 绫伙紝鎺ュ彛锛堝寘鎷敞瑙ｇ被鍨嬶級鎴杄num澹版�?
 *
 *     @Retention 琛ㄧず鍦ㄤ粈涔堢骇鍒繚瀛樿娉ㄨВ淇℃伅銆傚彲閫夌殑 RetentionPolicy 鍙傛暟鍖呮嫭锛�
 *         RetentionPolicy.SOURCE 娉ㄨВ灏嗚缂栬瘧鍣ㄤ涪寮�?
 *         RetentionPolicy.CLASS 娉ㄨВ鍦╟lass鏂囦欢涓彲鐢紝浣嗕細琚玍M涓㈠�?
 *         RetentionPolicy.RUNTIME VM灏嗗湪杩愯鏈熶篃淇濈暀娉ㄩ噴锛屽洜姝ゅ彲浠ラ�杩囧弽灏勬満鍒惰鍙栨敞瑙ｇ殑淇℃伅銆�
 *
 *     @Documented 灏嗘娉ㄨВ鍖呭惈鍦�javadoc 涓�
 *
 *     @Inherited 鍏佽�?愮被缁ф壙鐖剁被涓殑娉ㄨВ
 *
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
/*
 * 瀹氫箟娉ㄨ�?Test 娉ㄨВ涓惈鏈変袱涓厓绱�id 鍜�description description 鍏冪�?鏈夐粯璁ゅ�
 * "no description"
 */
public @interface MyAnotation {
    public int id();

    public String description() default "no description";
}
